home *** CD-ROM | disk | FTP | other *** search
- Path: wantree.com.au!usenet
- From: jpet@wantree.com.au (Jody Petroni)
- Newsgroups: comp.lang.c
- Subject: Loading a structure from a file
- Date: 4 Jan 1996 03:03:09 GMT
- Organization: Wantree Development
- Message-ID: <4cfg1d$5n9@vector.wantree.com.au>
- NNTP-Posting-Host: dialin44.wantree.com.au
- X-Newsreader: WinVN 0.92.6+
-
- Im trying to load this large structure from a file=>
-
- /*Existing Job Record*/
- struct jobrec{
- int job;
- char desc[81];
- int amt[50];
- };struct jobrec jobrecord[100];
-
- rather than the following code=>
-
- while(fscanf(fleptr,"%d%s%d%d%d...(50 times)",jobrecord[x].job,
- jobrecord[x].desc,jobrecord[x].amt[y]..(50 times)..)!=EOF){
- /*... Other code here*/
- }
- Is there an easier way to do this
-
- Please Help!!!
-